//
//  MyDatePickerView.h
//  datePickerView
//
//  Created by lianchuang on 14-11-19.
//  Copyright (c) 2014年 lianchuang. All rights reserved.
//

#import <UIKit/UIKit.h>

//导出的时间字符串格式, 想要什么格式的可以自行修改
#define FULL_DATE_FORMAT @"yyyy-MM-dd HH:mm"
#define PLAIN_DATE_FORMAT @"yyyy-MM-dd"


@interface MyDatePickerView : UIView <UIPickerViewDataSource, UIPickerViewDelegate>

//下面几个属性可以用来单独提取单个时间元素
@property (nonatomic, readonly) NSInteger year;
@property (nonatomic, readonly) NSInteger month;
@property (nonatomic, readonly) NSInteger day;
@property (nonatomic, readonly) NSInteger hour;
@property (nonatomic, readonly) NSInteger minute;

@property(nonatomic,strong)UIButton *cancleButton;
@property(nonatomic,strong)UIButton *sureButton;

@property(nonatomic,strong)UIPickerView *datePickerView;
@property (nonatomic, strong) NSDate *defaultDate;

@property(nonatomic,readonly)NSInteger yearCount;

@property(nonatomic,strong)NSString * nowYear;
@property(nonatomic,strong)NSString * nowMonth;
@property(nonatomic,strong)NSString * nowDay;


//获取时间对象
- (NSDate *)getDate;

//获取时间字符串, 想要自定义字符串格式可以在上边修改
- (NSString *)getDateString;

@end
